/**
 * 随机字符串
 * @param {Number} length 随机字符串长度 默认值：32
 * @returns {String} 字符串
 */
module.exports = function randomString(length = 32) {
  const dictionary = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678';
  let str = '';
  for (let i = 0; i < length; i++)
    str += dictionary.charAt(Math.floor(Math.random() * dictionary.length));
  return str;
};
